package com.company;

import com.company.service.JsonString;

import java.util.ArrayList;
import java.util.HashMap;

public class Task2 {
    public static void main(String[] args) {
        //todo 2.创建一个实体类，覆写toString()方法使之输出json格式字符串；

        ArrayList list =new ArrayList();
        HashMap map = new HashMap();
        map.put("name","王宇雷");
        map.put("sex","男");
        map.put("age","18");
        list.add(map);
        JsonString json = new JsonString(list);
        System.out.println(json.toSting());
    }
}
